#ifndef F_DETECTIONBROADCAST_H
#define F_DETECTIONBROADCAST_H

#include <QMainWindow>
#include "thread_detection.h"
#include <QCloseEvent>
#include <QMessageBox>
#include <QString>
#include <QTimer>
#include <fstream>
#include <iostream>
#include <QDate>

namespace Ui {
class F_DetectionBroadcast;
}

class F_DetectionBroadcast : public QMainWindow
{
    Q_OBJECT

public:
    explicit F_DetectionBroadcast(QWidget *parent = 0);
    ~F_DetectionBroadcast();

private slots:
    void on_Bt_Lancer_clicked();
    void Slot_RecupererNbreBroadcastEmis(int);
    void Slot_AfficherProblemesBroadcast(QString);
    void on_Bt_Arreter_clicked();
    void PeriodeSurveillance();
    void Slot_MaJBrProgression();
    void Slot_RedemarrerThread();


signals :
    void  Signal_FinTimerPgBr() ;
private:
    Ui::F_DetectionBroadcast *ui;
    // ATTRIBUTs ----------------------------------------------------------------
    const char *NomDufichierLog ;
    std::ofstream FichierLog ;
    Thread_Detection Thread_De_Detection;
    bool maybeSave();
    // METHODEs -----------------------------------------------------------------
    void MettreAJourFichierDeLog(QString) ;
    QTimer * TimerPeriod;
    QTimer * TimerPgBr;
    QTimer * TimerAffichage;
    int nNbreBroadcastRecupere;
    int counter ;
    int ValeurTimer2 ;

    bool Bt_Arreter_clicked;

protected:
    void closeEvent(QCloseEvent* event);
};

#endif // F_DETECTIONBROADCAST_H
